<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>摇红包</title>
    <link rel="stylesheet" href="__HOME_PUBLIC__/hb/css/csshake.min.css">
    <link rel="stylesheet" href="__HOME_PUBLIC__/hb/css/style.css">
    <script src="__HOME_PUBLIC__/hb/js/zepto.min.js"></script>
</head>
<body style="background-image:url({$shopcode.image}); background-size: 100% 100%;background-repeat:no-repeat;">
<div style="position:fixed;top:0;left:0;width:100%;height:100%;background: #000;opacity: 0.5;">
    <!-- 红包 -->
</div>
<div class="red" style="position:absolute;top:10rem;left:50%;margin-left:-150px;width:300px;">
    <!-- shake-chunk -->
    <img src="__HOME_PUBLIC__/hb/img/red-w.png" style="width:100%;">
    <button class="redbutton">拆红包</button>
    <div class="red-jg">
        <h1 style="margin:0 auto;">恭喜您！</h1>
        <h5>获得{$money/100}元微信现金红包</h5>
        <h4 style="color: white; font-size: 1rem;">点击右上角分享到朋友圈后领取</h4>
    </div>
</div>
<!-- End 红包 -->
<div class="t-btn">
</div>
</body>

<script type="text/javascript">
    $(document).ready(function () {
        // 点击redbutton按钮时执行以下全部
        $('.redbutton').click(function () {
            // 在带有red样式的div中添加shake-chunk样式
            $('.red').addClass('shake-chunk');
            // 点击按钮2000毫秒后执行以下操作
            // 在带有red样式的div中删除shake-chunk样式
            setTimeout(function () {
                $('.red').removeClass('shake-chunk');
                // 将redbutton按钮隐藏
                $('.redbutton').css("display", "none");
                // 修改red 下 span   背景图
                $('.red > img').attr("src","__HOME_PUBLIC__/hb/img/red-y.png");
                // 修改red-jg的css显示方式为块
                $('.red-jg').css("display", "block");
                var url = "{$hdurl}";
                url += "/id/" + {$id} + "/user_id/" + {$user_id} + "/shop_id/" + {$shop_id} + "";
                setTimeout(function () {
                    window.location.href = url;
                }, 3000);
            },2000);
        });
    });
</script>
</html>